import request from "@/utils/request";

// 登录方法
export function login(username, password, code, uuid) {
    const data = {
        username: username,
        password: password,
        code: code,
        uuid: uuid
    };
    return request({
        url: "/admin/login",
        headers: {
            isToken: false
        },
        method: "post",
        data: data
    });
}

export function getCodeImg() {
    return request({
        url: "/plan/login/captchaImage",
        headers: {
            isToken: false
        },
        method: "get",
        timeout: 20000
    });
}

// 注册方法
export function register(data) {
    return request({
        url: "/admin/login/register",
        headers: {
            isToken: false
        },
        method: "post",
        data: data
    });
}
